



<div class="modal-header">
    <h4 class="modal-title">订单</h4>
</div>
<div class="modal-body">
    <div class="row">
        <!-- <div class="col-sm-2 text-right">
            <p class="form-control-static">下单时间</p>
        </div> -->
        <div class="col-sm-2">
            <input type="text" class="form-control" datepicker-popup="yyyy-MM-dd" ng-model="start_time.date" is-open="start_time.opened"
                ng-click="open($event, start_time)" placeholder="下单开始时间" ng-required="true"  close-text="关闭" current-text="今天" clear-text="清除"  readonly/>
        </div>
        <div class="col-sm-2">
            <input type="text" class="form-control" datepicker-popup="yyyy-MM-dd" ng-model="end_time.date" is-open="end_time.opened"
                ng-click="open($event, end_time)" placeholder="下单结束时间" ng-required="true" close-text="关闭" current-text="今天" clear-text="清除" readonly/>                      
        </div>
        <div class="col-sm-2">
            <input type="text" class="form-control" ng-model="searchform.title" placeholder="订单名称">
        </div>
        <div class="col-sm-2">
            <input type="text" class="form-control" ng-model="searchform.code" placeholder="订单编号"> 
        </div>

        <div class="col-sm-2">
            <input type="text" class="form-control" ng-model="searchform.mobile" placeholder="下单电话"> 
        </div>

        <div class="col-sm-2">
            <button type="button" class="btn btn-default search btn-block" ng-click="exportToExcel('#Excel_table')">导出</button>
            <a id="dlink" download="{{ExcelName}}.xls" ng-show="false"></a>
        </div>
    </div>

    <div class="row mt10">
        <div class="col-sm-2">
            <input type="text" class="form-control" datepicker-popup="yyyy-MM-dd" ng-model="travel_time.date" is-open="travel_time.opened"
                ng-click="open($event, travel_time)" placeholder="出游时间" ng-required="true"  close-text="关闭" current-text="今天" clear-text="清除"  readonly/>
        </div>

        <div class="col-sm-2 pull-right">
            <button class="btn btn-block btn-info" ng-click='load()'>搜索</button>
        </div>
        
        <div class="col-sm-2 pull-right">
            <button class="btn btn-block btn-warning" ng-click='signupinfo()'>报名信息</button> 
        </div>


    </div>

<div class="table-responsive mt10">
    <table class="table table-condensed table-hover table-bordered" ng-show='main==1'>
        <thead>
            <tr>
                <th class="col-md-3 text-center">订单信息</th>
                <th class="col-md-3 text-center">用户信息</th>
                <th class="col-md-2 text-center">数量</th>
                <th class="col-md-3 text-center">支付信息</th>
                <th class="col-md-1 text-center">操作</th>
            </tr>
        </thead>
        <tbody>
            <tr ng-repeat="obj in objs">
                <td class="">
                    订单名称：{{obj.title}}<br>
                    订单编号：{{obj.code}}<br>
                    订单状态：
                    <span ng-if="obj.cancel_state == '0'"> 正常 </span>
                    <span ng-if="obj.cancel_state == '1'"> 
                        <span class="text-danger">订单已取消</span> <br>
                        取消时间：{{obj.cancel_time}} <br>
                        取消原因：{{obj.cancel_reason}} 
                    </span><br>
                    <span ng-if="obj.group != undefined"> 团期：{{obj.group}} </span>
                </td>
                <td class="">
                    <span ng-if="obj.name != undefined">下单姓名：{{obj.name}}</span><br>
                    下单电话：{{obj.mobile}}<br>
                    <span ng-if="obj.cardno != undefined">下单身份证号：{{obj.cardno}}</span><br>
                    下单时间：{{obj.create_time}}
                </td>
                <td class="">
                    购买数量：{{obj.num}}<br>使用数量：{{obj.used}}<br>退票数量：{{obj.back}}
                </td>
                <td class="">
                    交易金额：<span class="text-danger">{{obj.pay_fee}}</span><br>
                    支付状态：
                    <span ng-if="obj.pay_state == '1'">已支付<br>
                    支付时间：{{obj.pay_time}}<br>
                    交易号：{{obj.pay_trade_no}}
                    </span>
                    <span ng-if="obj.pay_state == '0'">未支付</span>
                </td>
                <td class="text-center">
                    <a ng-click="orderinfo(obj)" class="btn btn-success btn-xs">详情</a>
                </td>
            </tr>
        </tbody>
    </table>
    <div ng-repeat="exobj in exobjs" ng-show='signup==1'>
    	{{exobj.group}},姓名:{{exobj.name}},手机号:{{exobj.mobile}},身份证号:{{exobj.cardno}}
    </div>
    <table class="table table-condensed table-hover table-bordered" id="Excel_table" ng-show='false'>
        <thead>
            <tr>
                <th class="col-md-1 text-center">订单编号</th>
                <th class="col-md-1 text-center">订单标题</th>
                <th class="col-md-1 text-center">团期</th>
                <th class="col-md-1 text-center">姓名</th>
                <th class="col-md-1 text-center">手机号</th>
                <th class="col-md-1 text-center">身份证号</th>
            </tr>
        </thead>
        <tbody>
            <tr ng-repeat="exobj in exobjs">
                <td class="">{{exobj.code}}</td>
                <td class="">{{exobj.title}}</td>
                <td class="">{{exobj.group}}</td>
                <td class="">{{exobj.name}}</td>
                <td class="">{{exobj.mobile}}</td>
                <td class="">{{exobj.cardno}}</td>
            </tr>
        </tbody>
    </table>
    </div>
    <div class="text-right" ng-show='main==1'>
         <pagination total-items="bigTotalItems" ng-model="bigCurrentPage" ng-change="load()" previous-text="上一页" next-text="下一页"
            first-text="首页" last-text="尾页" max-size="maxSize" boundary-links="true" rotate="false" items-per-page="itemsPerPage"
            class="m-t-none m-b">
        </pagination>
    </div>



<div class="modal-footer">
    <!-- <button class="btn btn-primary" type="button" ng-click="gogo()">保存</button> -->
    <button class="btn btn-warning" type="button" ng-click="cancel()">返回</button>
</div>



